import 'package:flutter/material.dart';
import 'package:reader_app/widgets/progress_webview.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebPage extends StatelessWidget {
  final String url;

  const WebPage({Key key, this.url}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("xxx"),
      ),
      body: Container(
        width: double.infinity,
        height: double.infinity,
        child: new ProgressWebView(
          initialUrl: url,
          injectFontFamily: false,
          onPageFinished: (url) {},
          onWebViewCreated: (cont) {},
          navigationDelegate: (url) {
            return NavigationDecision.navigate;
          },
        ),
      ),
    );
  }
}
